@extends('layout.list')

@section('title', '用户中心页')

@section('content')
<div id="body_wrap">
    <div class="mu_wrap wrap clearfix" style="margin-left:30px;width:1200px;height:800px;">
  		<div id="navListWrap">
  			<div class="doota_nav mu_nav_wrap">
  				<div style="border:1px solid #E5E5E5;font-size:15px;">
		  			<p class="use-name" style="text-align:center"><a style="font-size:20px;" href="{{url('/list/index')}}">{{session('member')}}</a></p> 
		    		<p class="use-id" style="text-align:center">用户ID：{{session('id')}}</p> 
	    		</div> 
  				<ul class="doota_ul"> 
  					<li><a href="{{url('/list/index')}}" target="_self"> 我的订单 </a></li>
  					<li><a href="{{url('/collect')}}" target="_self"> 我的收藏 </a></li>
  				</ul>
  			</div>
  		</div>
  		@if (session('error'))
            <div class="mws-form-message success">
                {{ session('error')}}
            </div>
        @endif
		<div class="mu_content_wrap">
			<div class="order-title">
				<table width="1015px" height="40px" >
			    	<tr style="text-align:center;">
						<td width="180px">订单编号</td>
						<td width="100px">收货人</td>
						<td width="100px">电话</td>
						<td width="250px">收货地址</td>
						<td width="160px">实付款(元)</td>
						<td width="100px">交易状态</td>
						<td width="145px">操作</td>
					</tr>
				@foreach($orders as $k=>$v)
					<tr style="text-align:center;">
						<td width="180px">{{$v->order_code}}</td>
						<td width="100px">{{$v->name}}</td>
						<td width="100px">{{$v->phone}}</td>
						<td width="250px">{{$v->address}}</td>
						<td width="160px">{{$v->orderprice}}</td>
						<td width="100px">{{str_replace([0,1,2,3],['已下单','已付款','已发货','已完成'],$v->stat)}}</td>
						<td width="145px"><a href="{{url('/list/xiang')}}/{{$v->orderid}}" target="_self">订单详情</a></td>
					</tr>
				@endforeach
				</table>
			</div>
		</div>
	</div>
</div>
@endsection